<template>
  <div class="tabs_box">
    <div class="tabs_title_box">
      <div
        @click="activeIndex = index"
        :class="['tabs_item', index == activeIndex ? 'tabs_active' : '']"
        v-for="(item, index) in arrList"
        :key="index"
      >
        {{ item.name }}
      </div>
    </div>
    <div class="tabs_content" v-if="activeIndex == 0">
      <img :src="requireImg('tu02.png')" alt="" />
      <div class="content_right">
        {{ t("projectBackGround") }}
      </div>
    </div>
    <div class="tabs_content" v-else-if="activeIndex == 1">
      <img :src="requireImg('tu02.png')" alt="" />
      <div class="content_right">
        {{ t("tipsContent") }}
      </div>
    </div>
    <div class="tabs_content" v-else-if="activeIndex == 2">
      <img :src="requireImg('tu02.png')" alt="" />
      <div class="content_right">
        1、{{ t("active1") }}
        <br />
        2、{{ t("active2") }}<br />
        3、{{ t("active3") }}<br />
        4、{{ t("active4") }} <br />
        5、{{ t("active5") }}<br />
        6、{{ t("active6") }}<br />
        7、{{ t("active7") }}<br />
        8、{{ t("active8") }}
      </div>
    </div>
    <div class="tabs_content" v-else-if="activeIndex == 3">
      <img :src="requireImg('tu02.png')" alt="" />
      <div class="content_right">
        1、{{ t("ask1") }}<br />
        2、{{ t("ask2") }}<br />
        3、{{ t("ask3") }}<br />
      </div>
    </div>
  </div>
</template>
<script setup>
import { useStore } from "vuex";
import { ref, reactive, onMounted, computed } from "vue";
import { useI18n } from "vue-i18n";
const { locale, t } = useI18n();
import { useRouter } from "vue-router";
const router = useRouter();
const activeIndex = ref(0);
const store = useStore();
const arrList = computed(() => {
  return [
    { name: t("projectName") },
    { name: t("projectTips") },
    { name: t("projectActivity") },
    { name: t("projectRequire") },
  ];
});
const requireImg = (imgPath) => {
  return new URL(`../../../assets/images/${imgPath}`, import.meta.url).href;
};
const props = defineProps({
  title: {
    type: String,
    default: "",
  },
});
const goToPage = (value) => {
  router.push({
    name: value,
  });
};
</script>
<style lang="scss" scoped>
.tabs_box {
  display: flex;
  flex-direction: column;
  padding: 14px 0;
  width: 100%;
}
.tabs_title_box {
  display: flex;
  padding: 10px;
  align-items: center;
  gap: 10px;
  .tabs_item {
    background: #263257;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 9px;
    padding: 4px 10px;
    border: 1px solid transparent;
    background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: linear-gradient(to right, #263257, #263257), linear-gradient(90deg, #8F41E9, #578AEF);
  }
  .tabs_active {
    background: #ff9d00;
    color: #fff;
  }
}
.tabs_content {
  display: flex;
  padding: 10px 20px;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-around;
  .content_right {
    margin-left: 20px;
    font-size: 11px;
  }
  img {
    width: 100px;
  }
}
</style>
